// import Home from '../pages/home'
// import Login from '../pages/login'
// import Detail from '../pages/detail'
import React from "react"
// 路由拦截在
const Home = React.lazy(() => import('../pages/home'))
const Login = React.lazy(() => import('../pages/login'))
const Detail = React.lazy(() => import('../pages/detail'))
const Index = React.lazy(() => import('../pages/home/index/index'))
const My = React.lazy(() => import('../pages/home/my'))
const Car = React.lazy(() => new Promise(resolve => setTimeout(() => resolve(import('../pages/home/car')), 2002)))

export default [{
	path: '/home',
	component: Home,
	children: [{
		path: '/home/index',
		component: Index
	},{
		path: '/home/my',
		component: My
	},{
		path: '/home/car',
		component: Car
	}]
}, {
	path: '/login',
	component: Login
}, {
	path: '/detail',
	component: Detail
}, {
	from: '/',
	to: '/home/index'
}]